<div class='panel' >
	<style>
		.homePanelx {
			position: relative;
			top: -40px;
		}
		
		.homePanel h2 {
			margin-bottom: 10px;
			margin-top: 10px;
		}
		
		.homePanel p {
			margin-bottom: 0px;
			margin-top: 0px;
		}
		
		.homePanel pre {
			font-size: 0.9em;
		}
		
		.homePanel li {
			margin-bottom: 13px;
		}
		
		.homePanel textarea {
			font-size: .8em;
			margin-bottom: 7px;
		}
	</style>
	<div class='homePanel' style='font-size:1em;overflow-y: auto;height: 100%;'>
		<h2>Instructions</h2>
		<p>
			For the widgets under this menu to work, you need to have an apstrata account initialized with
			test data. 
		</p>
		<p>
			Please follow these steps:
			<ol>
				<li>Register an <a href="http://www.apstrata.com">Apstrata</a> account</li>
				<li>Navigate to <a href="http://developer.apstrata.com/apstrataSDK/demos/DevConsole">Development Console</a></li>
				<li>Click on scripts</li>
				<li>Login with the apstrata master credentials you obtained upon registeration</li>
				<li>Click on new, name the script <b>InitDemo</b>:</li>
				<li>Copy the following code into the script editor and save it</li>
				<textarea cols="70" rows="5">
&lt;script&gt;
&lt;scriptACL&gt;
     &lt;execute&gt;group:users&lt;/execute&gt;
     &lt;read&gt;group:users&lt;/read&gt;
     &lt;write&gt;group:users&lt;/write&gt;
&lt;/scriptACL&gt;
&lt;code&gt;&lt;![CDATA[

// The api_key used needs to be changed to a valid one 

	apsdb.log.setLogLevel(4)

	
	var url = 'http://api.flickr.com/services/rest/'
	   
	var query = {
		method: "flickr.photos.search",
		api_key: "376438894cafb5c5e9ef6b713bbeec09",
		tags: "tree, winter",
		per_page: 100, 
		page: 1,
		extras: "date_upload, date_taken, owner_name, original_format, last_update, geo, tags, views, media",
		format:"json",
		nojsoncallback: 1
	}
	
var response = apsdb.callHttp(url, "GET", query, null, null, null, true, null, false, false);

var content = eval("b="+response.file.content)

//apsdb.log.debug('content', content)
//apsdb.log.debug('length', content.photos.photo.length)

var doc
var saves=[]

for (i=0; i&lt;content.photos.photo.length; i++) {
	doc = content.photos.photo[i]
	doc["apsdb.store"] = "DefaultStore"
	doc["testData"] = "UFO"
	doc["apsdb.ftsFields"] = "title,tags,ownername"
	doc["views.apsdb.fieldType"] = "numeric"
	var saveDocument = apsdb.callApi("SaveDocument", doc, null);

	saves.push(saveDocument)
}
apsdb.log.debug('saves', saves)

]]&gt;
&lt;/code&gt;
&lt;/script&gt;
				</textarea><br>
				<li>Run the script using the run button, you don't need to provide any parameters</li>
				<li>Edit <b>HorizonFramework/index.html</b>, find <b>credendials</b> object definition and replace <i>key</i> with the your apstrata account key.</li>
			</ol>
		</p>
		<div style='clear: both;'></div>		
	</div>
</div>